<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2017/3/10
 * Time: 下午5:48
 */

function getSearchKeyword($keys)
{
    $keyword = '';
    $arr = explode(' ', $keys);
    foreach ($arr as $row) {
        if (strpos($row, ':') === false) {
            $keyword = $row;
            break;
        }
    }

    return $keyword;
}

echo getSearchKeyword('qqq: ::: vv::v bbb');